<?php

namespace app\admin\validate;

use think\Validate;

class Findstore extends Validate
{
    protected $failException = true;

    /**
     * 验证规则
     */
    protected $rule = [
        'name' => 'require',
        'start_area' => 'require',
        //'end_area' => 'require',
        'start_rent' => 'require',
       // 'end_rent' => 'require',
        'rent_unit' => 'require',
        'user_id' => 'require',
        'industry_pid' => 'require',
        'industry' => 'require',
        'contact_person' => 'require',

//        'city' => 'require',
//        'address' => 'require',

    ];
    // 'reward' => 'require',
    //'introduction' => 'require',

    /**
     * 提示消息
     */
    protected $message = [
    ];
    protected $field = [
        'name' => '标题',
        'user_id' => '所属用户',
        'start_area' => '面积范围',
        'end_area' => '面积范围',
        'start_rent' => '租金范围',
        'end_rent' => '租金范围',
        'rent_unit' => '租金单位',
        'reward' => '悬赏佣金',
        'city' => '所在地区',
        'introduction' => '介绍',
        'address' => '详细地址',
        'industry_pid' => '一级行业',
        'industry' => '行业',
        'contact_person' => '联系人',
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['name', 'user_id', 'start_area','start_rent','rent_unit', 'reward', 'city', 'address'],
        'edit' => [],
    ];

}
